"""
 @time: 2019/6/6 15:29
 
 @Author: Unicorn
"""
import tensorflow as tf

matrix1 = tf.constant([[3, 3]])  # 两行一列
matrix2 = tf.constant([[2], [2]])  # 一行两列
# 矩阵乘法
product = tf.matmul(matrix1, matrix2)

# method 1
sess = tf.Session()
result = sess.run(product)
print(result)
sess.close()

# method 2
with tf.Session() as sess:
    result2 = sess.run(product)
    print(result2)
